package next.TestFunctionality;

import next.Functionality.SmsFunctionality;
import next.TemplateActivity.R;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class TestSMS extends SmsFunctionality implements android.view.View.OnClickListener {
	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.generic_test_layout);
		//--Creating Dialog.
		String [] Botones={"OK","CANCEL"};
		String [] Items={"opcion1","opcion2","opcion3"};
		CreateDialog(TypeDialog.ALERT, R.drawable.icon, "TestingDialog", Botones, Items, null);
		CreateDialog(TypeDialog.PROGRESS, R.drawable.icon, "TestingDialog", Botones, Items, 100);
		//--Assembling widgets		
		Button btn=(Button) findViewById(R.id.test_V_BN1);
		btn.setOnClickListener(this);
	
	}

	@Override
	public void onClick(View v) {
		if (v.getId()==R.id.test_V_BN1){
			String [] address={"5556"};
		//Remember that application controller need to know who sends the message.!!!!	
		this.CreateSMS(TypeSMS.CUSTOM, address, "app S-3R4", "TestSMS");
		}
		else
			Toast.makeText(getBaseContext(), "Button does not exist!",Toast.LENGTH_SHORT).show();	
		
	}
}
